from django.db import models

# Create your models here.

class Users(models.Model):
    type = (('1','学生'),('2','老师'))
    uname = models.CharField(max_length=20,null=False)
    upwd = models.CharField(max_length=20,null=False)
    role = models.CharField(max_length=1,choices=type,null=False)

class Type(models.Model):
    tname = models.CharField(max_length=20,null=False)

class Vacate(models.Model):
    type1=(('0','待审核'),('1','通过'),('2','未通过'))
    stu_name = models.CharField(max_length=20,null=False)
    status = models.CharField(max_length=1,choices=type1,default='待审核',)
    createtime = models.DateField(null=False)
    context = models.CharField(max_length=200,null=False)
    tid = models.ForeignKey(Type,on_delete=models.CASCADE)

class Teachar(models.Model):
    name=models.CharField('教师姓名',max_length=30)
    password=models.CharField('教师密码',max_length=30)

class Student(models.Model):
    name=models.CharField('学生姓名',max_length=30)
    password=models.CharField('学生密码',max_length=30)





















